﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common.Data.Repository;
using ModernChannel.Data.DataContextStorage;
using ModernChannel.Model.Model;
using ModernChannel.Model.Model.Base;

namespace ModernChannel.Data.Repository
{
    public class ModernChannelRepository : GenericRepository
    {
        public ModernChannelRepository()
            : base(DataContextFactory.GetDataContext())
        {

        }
        private static ModernChannelRepository _current = null;
        public static ModernChannelRepository Current
        {
            get
            {
                return new ModernChannelRepository();
            }
        }

        public DbSet<ModernChannels> ModernChannels
        {
            get
            {
                return ((ModernChannelEntities)this.DbContext).ModernChannels;
            }
        }

        public DbSet<Province> Provinces { get { return ((ModernChannelEntities)this.DbContext).Provinces; } }

        public DbSet<District> Districts { get { return ((ModernChannelEntities)this.DbContext).Districts; } }

        public DbSet<ModelCat> ModelCat { get { return ((ModernChannelEntities)this.DbContext).ModelCat; } }

        public DbSet<Region> Regions { get { return ((ModernChannelEntities)this.DbContext).Regions; } }

        public DbSet<ShopInf> ShopInf { get { return ((ModernChannelEntities)this.DbContext).ShopInf; } }

        public DbSet<BilltoInf> BilltoInf { get { return ((ModernChannelEntities)this.DbContext).BilltoInf; } }

        public DbSet<Organization> Oragnizations { get { return ((ModernChannelEntities)this.DbContext).Organizations; } }

        public DbSet<ResponseSMS> ResponseSMSs { get { return ((ModernChannelEntities)this.DbContext).ResponseSMSs; } }

        public DbSet<OrderInfo> Orders { get { return ((ModernChannelEntities)this.DbContext).Orders; } }

        public DbSet<SerialNumberCdcHist> SerialNumberCdcHist { get { return ((ModernChannelEntities)this.DbContext).SerialNumberCdcHistory; } }
        public DbSet<SerialNumberRdcHist> SerialNumberRdcHist { get { return ((ModernChannelEntities)this.DbContext).SerialNumberRdcHistory; } }

    }
}
